package com.title1;

import java.io.*;
import java.util.Scanner;

/**
 * @Author milian
 * @Date 2021/8/3 0003 19:49
 */
public class title1 {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入数据源路径：");
        String srcPath = sc.next();
        System.out.println("请输入目的地：");
        String targePath = sc.next();
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream(srcPath));
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(targePath));
        byte[] bytes = new byte[1024];
        int len;
        while ((len=bis.read(bytes))!=-1){
            bos.write(bytes,0,len);
        }
        bis.close();
        bos.close();
    }
}
